﻿@{
	Layout = "~/Views/Home/_LayOutEmpty.cshtml";
}
@model TesteSharepointNovo.Models.Formacao

@Html.Partial("TopBar")

 
@using(Html.BeginForm("EditarFormacao","Home",FormMethod.Post,new {@class="form-horizontal"})){
<fieldset>
@Html.HiddenFor(c=>Model.Id)
@Html.HiddenFor(c=>Model.Curriculo.Id)


<legend>Formação</legend>


  
<!-- Text input-->
<div class="form-group">
  <label class="col-md-4 control-label">Descrição:</label>
   <div class="col-md-4">
	 @Html.TextBoxFor(p => p.Descricao, new { @class = "form-control input-md" })
		
  </div>
</div>

<div class="form-group">
  <label class="col-md-4 control-label">Ano Inicial:</label>
 
    <div class="col-md-4">
    <select id="AnoInicio" name="AnoInicio" class="form-control input-md">
	     @for (int i = DateTime.Now.Year; i > 1970; i--)
	     {
             var selected = i == Model.AnoInicio ? "selected" : string.Empty;
			     <option @selected value="@i">@i</option>
	     }

	
      </select>	
	

  </div>
</div>

<div class="form-group">
  <label class="col-md-4 control-label">Ano Final:</label>

    <div class="col-md-4">
	  <select id="AnoFinal" name="AnoFinal" class="form-control input-md">
        <option value="0">Incompleto</option>
	    @for (int i = DateTime.Now.Year; i > 1970; i--)
        {
          var selected = i == Model.AnoFinal ? "selected" : string.Empty;
			     <option @selected value="@i">@i</option>
        }

	
        </select>
	</div>

</div>


<div class="form-group">
  <label class="col-md-4 control-label">Local :</label>
     <div class="col-md-4">
   
	   @Html.TextBoxFor(p => p.Local, new { @class = "form-control input-md"})
	
    </div>

</div>
<!-- Text input-->

<div class="form-group">
    <div class="col-md-4">
        &nbsp;
    </div>
    <div class="col-md-4">
	    <button type="submit" class="btn btn-primary">Salvar</button>
	    <button type="reset" class="btn" onclick="location.href='@Url.Action("Contact")'">Cancelar</button>
    </div>
</div>
</fieldset>
}


